@extends("la.layouts.app")

@section("contentheader_title")
    <a href="{{ url(config('laraadmin.adminRoute') . '/wechat-upload') }}">微信资源管理</a> :
@endsection
@section("contentheader_description", '微信用户管理')
@section("section", "微信用户管理")
@section("section_url", url(config('laraadmin.adminRoute') . '/wechat-member'))
@section("sub_section", "Edit")

@section("htmlheader_title", "编辑微信用户")

@section("main-content")

    @if (count($errors) > 0)
        <div class="alert alert-danger">
            <ul>
                @foreach ($errors->all() as $error)
                    <li>{{ $error }}</li>
                @endforeach
            </ul>
        </div>
    @endif

    <div class="box">
        <div class="box-header">

        </div>
        <div class="box-body">
            <div class="row">
                <div class="col-md-8 col-md-offset-2">
                    <form method="POST" action="/admin/wechat-member/{{ $member->id }}" accept-charset="UTF-8" id="organization-edit-form" novalidate="novalidate">
                        <input name="_method" type="hidden" value="PUT">
                        <input name="id" type="hidden" value="{{ $member->id }}" />
                        {!! csrf_field() !!}
                        <div class="form-group">
                            <label for="name">openid :</label>
                            <input class="form-control" disabled value="{{ $member->openid }}"/>
                        </div>
                        <div class="form-group">
                            <label for="name">昵称 :</label>
                            <input class="form-control" value="{{ $member->nickname }}" disabled/>
                        </div>
                        <div class="form-group">
                            <label for="name">头像 :</label>
                            <img src="{{ $member->avatar }}" onerror="this.src='/images/default_avatar.jpg'" style="width: 64px;">
                        </div>
                        <div class="form-group">
                            <label for="name">性别 :</label>
                            <input class="form-control" value="{{ $member->sex }}" disabled/>
                        </div>
                        <div class="form-group">
                            <label for="name">语言 :</label>
                            <input class="form-control" value="{{ $member->language }}" disabled/>
                        </div>
                        <div class="form-group">
                            <label for="name">国家 :</label>
                            <input class="form-control" value="{{ $member->country }}" disabled/>
                        </div>
                        <div class="form-group">
                            <label for="name">省份 :</label>
                            <input class="form-control" value="{{ $member->province }}" disabled/>
                        </div>
                        <div class="form-group">
                            <label for="name">城市 :</label>
                            <input class="form-control" value="{{ $member->city }}" disabled/>
                        </div>
                        <div class="form-group">
                            <label for="name">首次使用 :</label>
                            <input class="form-control" value="{{ $member->created_at }}" disabled/>
                        </div>

                        <div class="form-group">
                            <label for="name">支付宝账号 :</label>
                            <input class="form-control" placeholder="" value="{{ $member->alipay_account }}" name="alipay_account"/>
                        </div>
                        <div class="form-group">
                            <label for="name">支付宝姓名 :</label>
                            <input class="form-control" placeholder="" value="{{ $member->alipay_name }}" name="alipay_name"/>
                        </div>
                        <div class="form-group">
                            <input class="btn btn-success" type="submit" value="修改">
                            <button type="button" class="btn btn-default pull-right">
                                <a href="/admin/wechat-upload">返回</a>
                            </button>
                        </div>
                    </form>
                </div>
            </div>
        </div>
    </div>

@endsection

@push('scripts')
    <script>
    </script>
@endpush
